﻿using Basic.FormRemoteModel.PageBody;
using Basic.FormRemoteModel.PageBody.Model;
using Basic.UserFormService.Page.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.UserFormService.RpcEvent
{
    internal class PageBodyEvent : IRpcApiService
    {
        private readonly IPageStructService _Service;

        public PageBodyEvent ( IPageStructService service )
        {
            this._Service = service;
        }
        public PageControlDto GetPageLayout ( GetPageLayout obj )
        {
            return this._Service.GetLayout(obj.LayoutId, obj.IsEdit);
        }

        public PageBodyDto GetPageBody ( GetPageBody obj )
        {
            return this._Service.Get(obj.Id, obj.IsEdit);
        }
    }
}
